<?php
require_once("SchoolDAO.php");
require_once("ReportableWrapper.php");

class School
{
	public $id;
	public $name;
	public $street;
	public $postcode;
	public $state;
	private $dao;

	public function __construct($id, $name, $street, $postcode, $state)
	{

		$this->id = $id;
		$this->name = $name;
		$this->street = $street;
		$this->state = $state;
		$this->postcode = $postcode;
		$this->dao = new SchoolDAO();

	}
	public static function findByAuthor($author)
	{
		
	}
	public static function findByDoodle($doodle)
	{
		
	}
	public static function findById($id)
	{
		$dao = new SchoolDAO();
		return $dao->findById($id);
	}	
	public static function findAll()
	{
		$dao = new SchoolDAO();
		return $dao->findAll();
	}	
	public static function findByParital($needle)
	{
		// Searches for schools whose name begins with (string) $needle.
		
		$dao = new SchoolDAO();
		return $dao->findByPartial($needle);
	}
}
?>